import 'package:flutter/cupertino.dart';
import 'package:flutter_svg/svg.dart';

enum IconNames {
  icon_dacha,
  icon_shanchu,
  icon_gerenxinxi,
  icon_yixuan,
  icon_riqi,
  icon_close_circle_fill,
  icon_a_ifankui,
  icon_sousuo,
  icon_add,
  icon_wenjian,
  icon_account,
  icon_password,
  icon_shebeiguanli,
  icon_caozuorizhi,
  icon_shujutongji,
  icon_a_icchufaliebiao,
  icon_xitongpeizhiguanli,
  icon_icon_test_5,
  icon_if_account_friend_hu,
  icon_shouqicebiandaohang,
  icon_zhankaicebiandaohang
}

extension parseString on IconNames {
  String serialize() => this.toString().split('.').last;
}

/// A class includes all icons which you provided from https://iconfont.cn
///
/// How to use it:
/// ```dart
/// IconFont(IconNames.xxx);
/// IconFont(IconNames.xxx, color: '#f00');
/// IconFont(IconNames.xxx, colors: ['#f00', 'blue']);
/// IconFont(IconNames.xxx, size: 30, color: '#000');
/// ```
///
/// The name is dynamic to against server interface.
/// Feel free to input string literal.
/// ```dart
/// IconFont('xxx');
/// ```
class EyeIconFont extends StatelessWidget {
  IconNames? name;
  final String? color;
  final List<String>? colors;
  final double size;

  EyeIconFont(dynamic iconName, {this.size = 18, this.color, this.colors}) {
    this.name = getIconNames(iconName);
  }

  static IconNames getIconNames(dynamic iconName) {
    switch (iconName) {
      case 'icon_dacha':
        iconName = IconNames.icon_dacha;
        break;
      case 'icon_shanchu':
        iconName = IconNames.icon_shanchu;
        break;
      case 'icon_gerenxinxi':
        iconName = IconNames.icon_gerenxinxi;
        break;
      case 'icon_yixuan':
        iconName = IconNames.icon_yixuan;
        break;
      case 'icon_riqi':
        iconName = IconNames.icon_riqi;
        break;
      case 'icon_close_circle_fill':
        iconName = IconNames.icon_close_circle_fill;
        break;
      case 'icon_a_ifankui':
        iconName = IconNames.icon_a_ifankui;
        break;
      case 'icon_sousuo':
        iconName = IconNames.icon_sousuo;
        break;
      case 'icon_add':
        iconName = IconNames.icon_add;
        break;
      case 'icon_wenjian':
        iconName = IconNames.icon_wenjian;
        break;
      case 'icon_account':
        iconName = IconNames.icon_account;
        break;
      case 'icon_password':
        iconName = IconNames.icon_password;
        break;
      case 'icon_shebeiguanli':
        iconName = IconNames.icon_shebeiguanli;
        break;
      case 'icon_caozuorizhi':
        iconName = IconNames.icon_caozuorizhi;
        break;
      case 'icon_shujutongji':
        iconName = IconNames.icon_shujutongji;
        break;
      case 'icon_a_icchufaliebiao':
        iconName = IconNames.icon_a_icchufaliebiao;
        break;
      case 'icon_xitongpeizhiguanli':
        iconName = IconNames.icon_xitongpeizhiguanli;
        break;
      case 'icon_icon_test_5':
        iconName = IconNames.icon_icon_test_5;
        break;
      case 'icon_if_account_friend_hu':
        iconName = IconNames.icon_if_account_friend_hu;
        break;
      case 'icon_shouqicebiandaohang':
        iconName = IconNames.icon_shouqicebiandaohang;
        break;
      case 'icon_zhankaicebiandaohang':
        iconName = IconNames.icon_zhankaicebiandaohang;
        break;
    }
    return iconName;
  }

  static String getColor(int arrayIndex, String? color, List<String>? colors,
      String defaultColor) {
    if (color != null && color.isNotEmpty) {
      return color;
    }

    if (colors != null && colors.isNotEmpty && colors.length > arrayIndex) {
      return colors.elementAt(arrayIndex);
    }

    return defaultColor;
  }

  @override
  Widget build(BuildContext context) {
    String svgXml;

    switch (this.name!) {
      case IconNames.icon_dacha:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M596.416 512L1020.928 20.544c7.104-8.128 1.088-20.544-9.856-20.544H881.92a26.688 26.688 0 0 0-19.84 8.96L512 414.336 161.92 8.96A26.176 26.176 0 0 0 142.016 0H12.928C1.984 0-4.032 12.416 3.072 20.544L427.584 512 3.072 1003.456c-7.104 8.128-1.088 20.544 9.856 20.544H142.08a26.688 26.688 0 0 0 19.84-8.96L512 609.664l350.08 405.376c4.864 5.632 12.16 8.96 19.904 8.96h129.088c10.944 0 16.96-12.416 9.856-20.544L596.416 512z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_shanchu:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z"
              fill="''' +
                getColor(0, color, colors, '#FD4346') +
                '''"
            />
            <path
              d="M701.056 706.56l-75.456-0.384L512 570.752l-113.472 135.296-75.52 0.384a9.088 9.088 0 0 1-9.152-9.152c0-2.176 0.768-4.224 2.112-5.952l148.736-177.152-148.736-177.024a9.152 9.152 0 0 1 6.976-15.104l75.52 0.32L512 457.856l113.472-135.36 75.456-0.32c4.992 0 9.152 3.968 9.152 9.152a9.536 9.536 0 0 1-2.176 5.952L559.36 514.304l148.608 177.152a9.152 9.152 0 0 1-6.976 15.104z"
              fill="''' +
                getColor(1, color, colors, '#FFFFFF') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_gerenxinxi:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M972.099244 908.871196c32.701956 0 57.5964-32.253984 50.684832-66.555841-28.414224-139.511281-144.054997-243.952753-282.478345-243.952753s-254.064121 104.441472-282.414349 243.952753c-7.03956 34.301856 17.91888 66.55584 50.55684 66.555841h463.715018z"
              fill="''' +
                getColor(0, color, colors, '#01B681') +
                '''"
              opacity=".2"
            />
            <path
              d="M724.242735 0.063996h-538.846322C83.066808 0.063996 0 86.07462 0 192.051997v639.960002c0 105.91338 83.1948 191.988001 185.332417 191.988001h538.846322a42.173364 42.173364 0 0 0 0-84.218736h-538.846322c-55.740516 0-101.11368-48.31698-101.113681-107.705269V191.988001c0-59.388288 45.373164-107.705268 101.113681-107.705269h538.846322c55.804512 0 101.177676 48.31698 101.177676 107.705269a42.109368 42.109368 0 1 0 84.218737 0c0-105.849384-83.1948-191.988001-185.332417-191.988001z m-72.31548 189.684145a197.939629 197.939629 0 0 0-125.048185 351.210049 311.020561 311.020561 0 0 0-177.268921 216.562465c-5.75964 26.302356 0.767952 53.884632 17.790888 74.811324 17.022936 21.310668 42.813324 33.661896 70.075621 33.661896H866.633835a89.786388 89.786388 0 0 0 87.738517-108.47322 311.020561 311.020561 0 0 0-177.140929-216.498469 197.939629 197.939629 0 0 0-125.304168-351.274045z m0.191988 311.724517A113.784888 113.784888 0 0 1 538.334354 387.879758v-0.127992a113.91288 113.91288 0 0 1 113.656897-113.720893h0.127992a113.784888 113.784888 0 0 1 0 227.505781z m-214.578589 280.302481a5.75964 5.75964 0 0 1-4.607712-2.303856 4.47972 4.47972 0 0 1-1.023936-3.967752 225.393913 225.393913 0 0 1 440.228485 0 4.47972 4.47972 0 0 1-1.087932 3.967752 5.75964 5.75964 0 0 1-4.607712 2.23986H437.60465h-0.063996z m-23.422536-562.652834H162.485845a42.173364 42.173364 0 0 0 0 84.282732H414.054122a42.109368 42.109368 0 0 0 0-84.282732zM355.113805 428.837198H162.549841a42.173364 42.173364 0 0 0 0 84.218736h192.62796a42.173364 42.173364 0 0 0 0-84.218736z m-192.62796 0z"
              fill="''' +
                getColor(1, color, colors, '#01B681') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_yixuan:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M682.514018 190.916859c-6.779627 0-12.791749-2.55835-17.908449-7.67505a68.307941 68.307941 0 0 1-12.791749-17.908449 97.089377 97.089377 0 0 1-10.233399-38.886918V0.575629h2.04668c5.500452 0 11.128822 0.639587 16.885109 2.04668s12.663832 4.60503 20.466799 9.721729 17.396779 12.280079 28.653518 21.490139 25.455581 21.298263 42.468608 36.328568c18.420119 16.373439 32.938755 30.188528 43.491947 41.445268 10.617152 11.256739 18.803872 20.786593 24.560159 28.653518 5.756287 7.866926 9.401936 14.518635 10.74507 19.955129a60.121222 60.121222 0 0 1 2.046679 14.326759v16.37344h-150.430972z m-236.327568 577.09977c0 38.886918 7.802967 75.02361 23.536818 108.474035 15.669893 33.450424 37.096073 62.039984 64.470417 85.960555h-337.702182c-12.983626 0-27.118509-3.773566-42.468608-11.256739s-29.676858-17.396779-42.980277-29.676859-24.368282-26.414962-33.258549-42.468608a101.246696 101.246696 0 0 1-13.303419-49.631987V132.586482c0-14.326759 3.389814-29.357065 10.233399-45.026958s15.861769-29.868735 27.118509-42.468608 24.048489-23.217025 38.375248-31.723538c14.326759-8.506513 29.357065-12.791749 45.026958-12.791749h390.8519v127.917493c0 12.983626 2.04668 26.926632 6.14004 41.956938 4.09336 14.966347 10.617152 28.781436 19.443459 41.445268s20.147005 23.153066 33.770218 31.723538c13.687172 8.506513 29.676858 12.791749 48.096977 12.791749h149.407632v284.424546c-18.420119-10.872987-38.375248-19.187624-59.865386-25.071828a256.15478 256.15478 0 0 0-67.028767-8.69839c-49.120317 0-93.635605 12.152162-133.545863 36.328568A259.800429 259.800429 0 0 0 478.933328 640.163095H256.804601c-17.716573 0-32.938755 6.331916-45.538628 18.931789s-18.931789 27.822055-18.931789 45.538627 6.331916 32.746878 18.931789 45.026958A62.935407 62.935407 0 0 0 256.804601 768.080588h189.31789zM256.804601 384.328108c-17.716573 0-32.938755 6.203998-45.538628 18.484078s-18.931789 27.246426-18.931789 45.026958a62.039984 62.039984 0 0 0 18.931789 45.474669A62.039984 62.039984 0 0 0 256.804601 512.245602h383.75248a62.039984 62.039984 0 0 0 45.474669-18.931789c12.663832-12.599873 18.931789-27.758096 18.931789-45.474669s-6.267957-32.746878-18.931789-45.026958A62.935407 62.935407 0 0 0 640.557081 384.328108h-383.75248z m686.597145 573.07037c9.593812 11.576533 14.838429 21.298263 15.861769 29.165188 1.02334 7.866926-2.238556 15.861769-9.721729 24.048489-8.18672 9.593812-17.076985 14.006966-26.606839 13.303419a52.638048 52.638048 0 0 1-28.653519-12.280079l-86.983895-83.913875a203.836525 203.836525 0 0 1-123.824133 30.188528 190.597065 190.597065 0 0 1-61.912067-15.861769 171.4734 171.4734 0 0 1-54.684728-38.886918 194.114796 194.114796 0 0 1-56.283697-136.104213c0-24.560159 4.732947-48.608647 14.326759-72.145466 9.529853-23.536819 23.536819-44.835081 41.956938-63.958747a189.957477 189.957477 0 0 1 133.993574-56.283697c24.560159 0 48.608647 4.796906 72.145466 14.32676 23.536819 9.593812 44.515288 23.536819 62.935407 41.956937 16.373439 17.076985 29.037271 35.816898 37.863578 56.283697 8.890266 20.466799 14.198842 41.445268 15.861769 62.935407a202.237557 202.237557 0 0 1-30.188529 123.312463l83.913876 83.913876z m-241.508227-63.447077c17.076985 0 33.130631-3.389814 48.096977-10.233399a133.034193 133.034193 0 0 0 39.398588-27.118509 126.254566 126.254566 0 0 0 36.328568-89.542245c0-17.013027-3.197937-33.258548-9.721729-48.608647-6.459833-15.350099-15.350099-28.781436-26.606839-40.421928a121.393701 121.393701 0 0 0-87.495565-36.840238 120.882031 120.882031 0 0 0-88.518906 36.840238c-11.256739 11.640492-20.083046 25.071829-26.606838 40.421928s-9.721729 31.595621-9.72173 48.608647a126.254566 126.254566 0 0 0 36.328568 89.542245c11.256739 11.256739 24.432241 20.274923 39.398588 27.118509 15.030305 6.843586 31.403745 10.233399 49.120318 10.233399z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_riqi:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M950.848 97.536h-146.304V48.768a48.768 48.768 0 0 0-97.472 0v48.768H316.928V48.768a48.768 48.768 0 0 0-97.472 0v48.768H73.152C32.832 97.536 0 130.304 0 170.688v780.16C0 991.168 32.832 1024 73.152 1024h877.696c40.32 0 73.152-32.832 73.152-73.152V170.688c0-40.32-32.832-73.152-73.152-73.152zM219.52 195.072v48.768a48.768 48.768 0 0 0 97.472 0v-48.768h390.144v48.768a48.768 48.768 0 0 0 97.472 0v-48.768h121.92v146.24H97.536V195.072h121.92zM97.536 926.464V438.848h828.928v487.68H97.536z"
              fill="''' +
                getColor(0, color, colors, '#50BC93') +
                '''"
            />
            <path
              d="M681.024 510.912l-223.744 210.88-97.984-100.48a48.768 48.768 0 1 0-69.824 68.032l131.456 134.848a48.64 48.64 0 0 0 68.352 1.472l258.624-243.84a48.768 48.768 0 1 0-66.88-70.912z"
              fill="''' +
                getColor(1, color, colors, '#50BC93') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_close_circle_fill:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m165.4 618.2l-66-0.3L512 563.4l-99.3 118.4-66.1 0.3c-4.4 0-8-3.5-8-8 0-1.9 0.7-3.7 1.9-5.2l130.1-155L340.5 359c-1.2-1.5-1.9-3.3-1.9-5.2 0-4.4 3.6-8 8-8l66.1 0.3L512 464.6l99.3-118.4 66-0.3c4.4 0 8 3.5 8 8 0 1.9-0.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_a_ifankui:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M186.496 819.2a51.84 51.84 0 0 0 7.68-0.64l215.296-37.76a12.544 12.544 0 0 0 6.784-3.584l542.592-542.592a12.8 12.8 0 0 0 0-18.048L746.112 3.712C743.68 1.28 740.48 0 737.024 0s-6.656 1.28-9.088 3.712L185.344 546.304a12.992 12.992 0 0 0-3.584 6.784l-37.76 215.296a43.392 43.392 0 0 0 42.496 50.816z m86.272-223.232l464.256-464.128 93.824 93.824-464.256 464.128-113.792 20.096 19.968-113.92zM983.04 926.72H40.96a40.96 40.96 0 0 0-40.96 40.96v46.08c0 5.632 4.608 10.24 10.24 10.24h1003.52a10.24 10.24 0 0 0 10.24-10.24v-46.08a40.96 40.96 0 0 0-40.96-40.96z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_sousuo:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M1012.672 957.312l-169.728-169.728a475.776 475.776 0 0 0 113.088-308.416 478.016 478.016 0 1 0-477.952 478.016c118.72 0 227.136-43.52 310.72-115.2l169.6 169.6a38.208 38.208 0 0 0 54.272 0 38.336 38.336 0 0 0 0-54.272zM478.08 880.384c-221.248 0-401.28-179.968-401.28-401.216s180.032-401.216 401.28-401.216 401.152 180.032 401.152 401.28-179.968 401.152-401.152 401.152z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_add:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M469.312 0h85.376c7.552 0 11.328 3.84 11.328 11.392v1001.216c0 7.616-3.776 11.392-11.328 11.392H469.312c-7.552 0-11.328-3.84-11.328-11.392V11.392c0-7.616 3.776-11.392 11.328-11.392z m-435.2 457.984h955.776c7.552 0 11.328 3.776 11.328 11.328v85.376c0 7.552-3.776 11.328-11.328 11.328H34.112c-7.552 0-11.328-3.776-11.328-11.328V469.312c0-7.552 3.776-11.328 11.328-11.328z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_wenjian:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M825.5 965h-627C122.1 965 60 902.9 60 826.5v-627C60 123.1 122.1 61 198.5 61h111.2c53.8 0 103.2 31.5 125.9 80.3l30.8 66.4c10.2 22 32.6 36.3 56.9 36.3h301.6c76.7 0 139.2 62.4 139.2 139.2v443.3C964 902.9 901.9 965 825.5 965z m-627-828c-34.5 0-62.5 28-62.5 62.5v627c0 34.5 28 62.5 62.5 62.5h627c34.5 0 62.5-28 62.5-62.5V383.2c0-34.8-28.3-63.2-63.2-63.2H523.3c-53.8 0-103.1-31.5-125.8-80.3l-30.8-66.4c-10.3-22-32.7-36.3-57-36.3H198.5z"
              fill="''' +
                getColor(0, color, colors, '#999999') +
                '''"
            />
            <path
              d="M861.5 281.8h-76v-39.2c0-34.2-27.8-61.9-61.9-61.9H394.7v-76h328.9c76.1 0 137.9 61.9 137.9 137.9v39.2zM474.9 815.4H266.6c-21 0-38-17-38-38s17-38 38-38h208.3c21 0 38 17 38 38s-17 38-38 38z"
              fill="''' +
                getColor(1, color, colors, '#999999') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_account:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M512 0.192a320 320 0 0 0-320 320c0 109.696 55.36 206.4 139.52 264.064A512 512 0 0 0 1.92 1023.808h89.6C111.424 809.216 292.352 640.64 512 640.64s400.512 168.576 420.416 383.168h89.6a512 512 0 0 0-329.472-439.552A320 320 0 0 0 512 0.256h-0.064zM512 552.32c-127.04 0-230.4-103.36-230.4-230.4s103.36-230.4 230.4-230.4 230.4 103.36 230.4 230.4-103.36 230.4-230.4 230.4z"
              fill="''' +
                getColor(0, color, colors, '#01B681') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_password:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M147.904 540.224h738.752v405.376H147.904z"
              fill="''' +
            getColor(0, color, colors, '#01B681') +
            '''"
              opacity=".2"
            />
            <path
              d="M669.824 89.6c40.448 0 73.28 33.28 73.28 74.24V540.16H870.4v394.24H153.6V540.16H280.896V163.84c0-40.96 32.832-74.24 73.28-74.24h315.648m0-89.6H354.176A163.392 163.392 0 0 0 191.36 163.84v286.72H104.704A40.832 40.832 0 0 0 64 491.52v491.52c0 22.656 18.176 40.96 40.704 40.96h814.592a40.832 40.832 0 0 0 40.704-40.96V491.52a40.832 40.832 0 0 0-40.704-40.96H832.64V163.84c0-90.496-72.96-163.84-162.88-163.84z"
              fill="''' +
            getColor(1, color, colors, '#01B681') +
            '''"
            />
            <path
              d="M547.648 753.92v67.84a10.24 10.24 0 0 1-10.24 10.24h-50.88a10.24 10.24 0 0 1-10.176-10.24v-67.84a61.44 61.44 0 0 1-25.472-49.92c0-33.92 27.392-61.44 61.12-61.44s61.12 27.52 61.12 61.44a61.44 61.44 0 0 1-25.472 49.92zM123.328 450.624h780.288v89.6H123.328z"
              fill="''' +
            getColor(2, color, colors, '#01B681') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_shebeiguanli:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M1021.93792 894.08l-69.44-244.48V117.44a36.672 36.672 0 0 0-36.672-36.672H108.40192a36.672 36.672 0 0 0-36.672 36.672v532.16L2.28992 894.08a36.736 36.736 0 0 0 34.56 49.152h950.528a36.736 36.736 0 0 0 34.56-49.216v0.064zM154.28992 163.264h715.52V616.32H154.35392V163.264z m261.76 697.408l9.344-42.432H597.87392l9.28 42.432H416.11392z m256.96 0l-21.888-99.456a9.216 9.216 0 0 0-8.96-7.232h-261.12a9.088 9.088 0 0 0-8.96 7.232l-21.824 99.456H97.64992l48.512-170.88h731.904l48.512 170.88h-253.568z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_caozuorizhi:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M877.696 54.848h-123.392V9.152A9.152 9.152 0 0 0 745.152 0h-64a9.152 9.152 0 0 0-9.152 9.152v45.696H498.304V9.152A9.152 9.152 0 0 0 489.152 0h-64A9.152 9.152 0 0 0 416 9.152v45.696H292.544A36.48 36.48 0 0 0 256 91.52V228.48H146.304a36.48 36.48 0 0 0-36.608 36.608v722.304a36.48 36.48 0 0 0 36.608 36.544h585.152a36.48 36.48 0 0 0 36.544-36.544v-109.76h109.696a36.48 36.48 0 0 0 36.608-36.544V91.456a36.48 36.48 0 0 0-36.608-36.608z m-192 886.848H192V310.848h249.152v198.848c0 25.28 20.48 45.76 45.696 45.76h198.848v386.24z m0-459.392H514.304V310.848h0.192l171.2 171.2v0.256zM832 795.456h-64V448L548.544 228.544H338.304V137.152H416v36.544c0 5.056 4.096 9.152 9.152 9.152h64a9.152 9.152 0 0 0 9.152-9.152v-36.544H672v36.544c0 5.056 4.096 9.152 9.152 9.152h64a9.152 9.152 0 0 0 9.152-9.152v-36.544H832v658.304z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_shujutongji:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M1013.312 885.312H96v-832a10.688 10.688 0 0 0-10.688-10.624H10.688A10.688 10.688 0 0 0 0 53.312v917.376c0 5.824 4.8 10.624 10.688 10.624h1002.624a10.688 10.688 0 0 0 10.688-10.624V896a10.688 10.688 0 0 0-10.688-10.688z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
            <path
              d="M213.312 778.688H288A10.688 10.688 0 0 0 298.688 768V576a10.688 10.688 0 0 0-10.688-10.688H213.312A10.688 10.688 0 0 0 202.688 576v192c0 5.888 4.8 10.688 10.624 10.688z m202.688 0h74.688A10.688 10.688 0 0 0 501.312 768V341.312a10.688 10.688 0 0 0-10.624-10.624H416a10.688 10.688 0 0 0-10.688 10.624V768c0 5.888 4.8 10.688 10.688 10.688z m202.688 0h74.624A10.688 10.688 0 0 0 704 768V445.312a10.688 10.688 0 0 0-10.688-10.624H618.688a10.688 10.688 0 0 0-10.688 10.624V768c0 5.888 4.8 10.688 10.688 10.688z m202.624 0H896a10.688 10.688 0 0 0 10.688-10.688V234.688A10.688 10.688 0 0 0 896 224h-74.688a10.688 10.688 0 0 0-10.624 10.688V768c0 5.888 4.8 10.688 10.624 10.688z"
              fill="''' +
                getColor(1, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_a_icchufaliebiao:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M747.199412 284.929848v-57.855856a9.663976 9.663976 0 0 0-9.727976-9.727975H273.792596a9.663976 9.663976 0 0 0-9.599976 9.727975v57.855856c0 5.375987 4.351989 9.727976 9.599976 9.727975h463.67884a9.663976 9.663976 0 0 0 9.663976-9.727975h0.064zM277.120587 391.233582c-7.231982 0-12.991968 4.351989-12.991967 9.663976v57.919855c0 5.311987 5.823985 9.663976 12.927967 9.663976h300.15925c7.103982 0 12.991968-4.351989 12.991967-9.599976v-57.983855c0-5.311987-5.759986-9.599976-12.991967-9.599976H277.120587zM273.728596 586.241094a9.663976 9.663976 0 0 0-9.599976 9.727976v57.855855c0 5.375987 4.351989 9.727976 9.599976 9.727976h222.207444c5.311987 0 9.599976-4.351989 9.599976-9.727976v-57.855855a9.663976 9.663976 0 0 0-9.599976-9.727976H273.728596z"
              fill="''' +
            getColor(0, color, colors, '#333333') +
            '''"
            />
            <path
              d="M447.744161 937.088217H167.552861V86.850343h676.22231v415.358961c0 5.311987 4.351989 9.727976 9.599976 9.727976h67.64783a9.663976 9.663976 0 0 0 9.663976-9.663976V38.658463A38.655903 38.655903 0 0 0 892.03105 0.00256H119.232982a38.655903 38.655903 0 0 0-38.655903 38.655903v946.621634c0 21.439946 17.279957 38.719903 38.591903 38.719903h328.383179a9.663976 9.663976 0 0 0 9.727976-9.663976v-67.647831a9.663976 9.663976 0 0 0-9.599976-9.599976z"
              fill="''' +
            getColor(1, color, colors, '#333333') +
            '''"
            />
            <path
              d="M670.591604 617.025017L530.239954 988.800088H602.239774l36.863908-101.503746h124.735688l35.647911 101.503746h73.727816l-133.503666-371.711071h-69.055828z m71.103822 206.847483h-79.871801l40.767899-112.383719 39.103902 112.383719zM874.559094 617.025017h68.863827v371.711071h-68.863827z"
              fill="''' +
            getColor(2, color, colors, '#333333') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_xitongpeizhiguanli:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M983.936 642.176l-74.88-64a411.008 411.008 0 0 0 0-132.16l74.88-64a36.608 36.608 0 0 0 10.624-40.256l-1.024-2.944A507.136 507.136 0 0 0 902.4 181.184l-2.048-2.368a36.736 36.736 0 0 0-40.128-10.88l-92.864 33.024a402.752 402.752 0 0 0-113.92-65.792L635.392 38.016a36.608 36.608 0 0 0-29.504-29.44L602.88 8.128a516.352 516.352 0 0 0-181.76 0l-3.072 0.576a36.608 36.608 0 0 0-29.44 29.376l-18.112 97.6a402.176 402.176 0 0 0-113.152 65.6l-93.568-33.28a36.544 36.544 0 0 0-40.128 10.88L121.6 181.12A509.76 509.76 0 0 0 30.464 338.816L29.44 341.76a36.736 36.736 0 0 0 10.624 40.32L115.84 446.72a402.112 402.112 0 0 0 0 130.56L40.064 641.92a36.608 36.608 0 0 0-10.624 40.256l1.024 2.944c20.736 57.6 51.328 110.72 91.136 157.632l2.048 2.368c9.792 11.52 25.728 15.872 40.128 10.88l93.568-33.28A399.36 399.36 0 0 0 370.56 888.32l18.048 97.6a36.608 36.608 0 0 0 29.504 29.44l3.072 0.512a513.6 513.6 0 0 0 181.76 0l3.072-0.576a36.608 36.608 0 0 0 29.44-29.376l17.984-97.152a400 400 0 0 0 113.92-65.792l92.928 33.024a36.544 36.544 0 0 0 40.128-10.88l2.048-2.368a509.76 509.76 0 0 0 91.136-157.632l1.024-2.944a36.48 36.48 0 0 0-10.624-40zM827.904 459.52a323.456 323.456 0 0 1 0 105.344l-7.552 45.824 85.376 73.088a422.912 422.912 0 0 1-48.64 84.096l-106.112-37.632-35.84 29.504a319.36 319.36 0 0 1-90.688 52.352l-43.52 16.32-20.48 110.912a431.424 431.424 0 0 1-97.152 0l-20.48-111.104-43.136-16.576a319.744 319.744 0 0 1-89.984-52.224l-35.84-29.632-106.816 37.952a431.872 431.872 0 0 1-48.64-84.096L204.672 609.92l-7.424-45.696a329.088 329.088 0 0 1-4.224-52.032c0-17.472 1.344-34.944 4.224-51.968l7.424-45.76L118.4 340.736c12.864-29.824 29.248-57.92 48.64-84.096l106.752 37.952 35.904-29.632a319.744 319.744 0 0 1 89.984-52.224l43.264-16.32 20.48-111.104a431.424 431.424 0 0 1 97.152 0l20.48 110.848 43.52 16.384c32.832 12.352 63.36 29.952 90.624 52.352l35.84 29.44 106.112-37.568c19.456 26.176 35.648 54.4 48.64 84.096L820.48 413.888l7.424 45.632zM512.128 299.648a201.152 201.152 0 1 0 0 402.304 201.152 201.152 0 0 0 0-402.304z m90.496 291.648c-24.192 24.128-56.32 37.504-90.496 37.504s-66.304-13.44-90.56-37.504c-24.064-24.256-37.44-56.32-37.44-90.496s13.376-66.304 37.44-90.56c24.256-24.192 56.32-37.504 90.56-37.504s66.304 13.312 90.496 37.504c24.128 24.256 37.504 56.32 37.504 90.56s-13.376 66.24-37.504 90.496z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_icon_test_5:
        svgXml = '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M960 38.4c12.8 0 25.6 12.8 25.6 25.6v896c0 12.8-12.8 25.6-25.6 25.6H64c-12.8 0-25.6-12.8-25.6-25.6V64C38.4 51.2 51.2 38.4 64 38.4h896m0-38.4H64C25.6 0 0 25.6 0 64v896c0 38.4 25.6 64 64 64h896c38.4 0 64-25.6 64-64V64c0-38.4-25.6-64-64-64z"
              fill="''' +
            getColor(0, color, colors, '#333333') +
            '''"
            />
            <path
              d="M512 851.2c-147.2 0-268.8-121.6-268.8-268.8 0-83.2 38.4-166.4 108.8-217.6 6.4-6.4 19.2-6.4 25.6 6.4 6.4 6.4 6.4 19.2 0 25.6-64 44.8-96 115.2-96 185.6 0 128 102.4 230.4 230.4 230.4s230.4-102.4 230.4-230.4c0-70.4-32-140.8-89.6-185.6-12.8-6.4-12.8-12.8-6.4-25.6 6.4-6.4 19.2-12.8 25.6-6.4 70.4 51.2 108.8 128 108.8 217.6 0 147.2-121.6 268.8-268.8 268.8z"
              fill="''' +
            getColor(1, color, colors, '#333333') +
            '''"
            />
            <path
              d="M512 256c12.8 0 19.2 6.4 19.2 19.2v288c0 6.4-6.4 12.8-19.2 12.8s-19.2-6.4-19.2-12.8V268.8c0-6.4 6.4-12.8 19.2-12.8"
              fill="''' +
            getColor(2, color, colors, '#333333') +
            '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_if_account_friend_hu:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M702.304 522.624A254.656 254.656 0 0 0 768 352c0-141.152-114.848-256-256-256s-256 114.848-256 256 114.848 256 256 256a254.176 254.176 0 0 0 135.456-39.168A383.296 383.296 0 0 1 894.688 896H129.344a384.192 384.192 0 0 1 130.496-257.632 32 32 0 1 0-42.048-48.256A448 448 0 0 0 64 928a32 32 0 0 0 32 32h832a32 32 0 0 0 32-32c0-175.552-101.76-332.32-257.696-405.376zM320 352c0-105.888 86.112-192 192-192s192 86.112 192 192-86.112 192-192 192-192-86.112-192-192z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_shouqicebiandaohang:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M394.112 422.4h619.52A10.304 10.304 0 0 0 1024 412.16V340.48a10.304 10.304 0 0 0-10.304-10.24h-619.52a10.304 10.304 0 0 0-10.368 10.24v71.68c0 5.632 4.672 10.24 10.304 10.24zM383.808 683.52c0 5.632 4.672 10.24 10.304 10.24h619.52a10.304 10.304 0 0 0 10.368-10.24V611.84a10.304 10.304 0 0 0-10.304-10.24h-619.52a10.304 10.304 0 0 0-10.368 10.24v71.68zM1013.76 61.44H10.24a10.24 10.24 0 0 0-10.24 10.24v71.68c0 5.632 4.608 10.24 10.24 10.24h1003.52a10.24 10.24 0 0 0 10.24-10.24V71.68a10.24 10.24 0 0 0-10.24-10.24zM1013.76 870.4H10.24a10.24 10.24 0 0 0-10.24 10.24v71.68c0 5.632 4.608 10.24 10.24 10.24h1003.52a10.24 10.24 0 0 0 10.24-10.24v-71.68a10.24 10.24 0 0 0-10.24-10.24zM4.352 520.832L204.416 678.4c7.424 5.888 18.432 0.64 18.432-8.832V354.432c0-9.472-10.88-14.72-18.432-8.832L4.352 503.168a11.2 11.2 0 0 0 0 17.664z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
      case IconNames.icon_zhankaicebiandaohang:
        svgXml =
            '''
          <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
            <path
              d="M394.112 422.4h619.52A10.304 10.304 0 0 0 1024 412.16V340.48a10.304 10.304 0 0 0-10.304-10.24h-619.52a10.304 10.304 0 0 0-10.368 10.24v71.68c0 5.632 4.672 10.24 10.304 10.24zM383.808 683.52c0 5.632 4.672 10.24 10.304 10.24h619.52a10.304 10.304 0 0 0 10.368-10.24V611.84a10.304 10.304 0 0 0-10.304-10.24h-619.52a10.304 10.304 0 0 0-10.368 10.24v71.68zM1013.76 61.44H10.24a10.24 10.24 0 0 0-10.24 10.24v71.68c0 5.632 4.608 10.24 10.24 10.24h1003.52a10.24 10.24 0 0 0 10.24-10.24V71.68a10.24 10.24 0 0 0-10.24-10.24zM1013.76 870.4H10.24a10.24 10.24 0 0 0-10.24 10.24v71.68c0 5.632 4.608 10.24 10.24 10.24h1003.52a10.24 10.24 0 0 0 10.24-10.24v-71.68a10.24 10.24 0 0 0-10.24-10.24zM218.56 503.168L18.432 345.6a11.392 11.392 0 0 0-18.368 8.832v315.136c0 9.472 10.88 14.72 18.368 8.832l200.128-157.568a11.2 11.2 0 0 0 0-17.664z"
              fill="''' +
                getColor(0, color, colors, '#333333') +
                '''"
            />
          </svg>
        ''';
        break;
    }

    return SvgPicture.string(svgXml, width: this.size, height: this.size);
  }
}
